# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import grpc

from protos import helloworld_pb2
from protos import helloworld_pb2_grpc


def main():
    channel = grpc.insecure_channel('localhost:50051')
    stub = helloworld_pb2_grpc.GreetingStub(channel)
    response = stub.CreateUser(helloworld_pb2.UserRequest(name='zf'))
    print 'Response: {0}'.format(response)

if __name__ == '__main__':
    main()
